package com.api.sw.duban.web;

import com.alibaba.fastjson.JSONObject;
import com.api.sw.duban.util.LogTool;
import weaver.conn.RecordSet;
import weaver.general.Util;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.Context;
@Path("/oasso")
public class SSOAction {
    private final static LogTool log = new LogTool("/log/duban/",false);
    @GET
    @Path("/getappid")
    @Produces({"text/plain"})
    public String getAppid(@Context HttpServletRequest var1, @Context HttpServletResponse var2){
        JSONObject json=new JSONObject();
        RecordSet re=new RecordSet();
        String oaappid="";
        String whappid="";
        try{
            String sql="select whappid,oaappid from uf_ssonew  ";
            re.execute(sql);
            while(re.next()){
                oaappid= Util.null2String(re.getString("oaappid"));
                whappid= Util.null2String(re.getString("whappid"));
            }
        }catch(Exception e){

        }
        json.put("oaappid",oaappid);
        json.put("whappid",whappid);
        return JSONObject.toJSONString(json);
    }
}
